package linkedList;

public class QuestionFour {
    //给你一个头节点 反转链表
    //用递归
    public ListNode reverseList(ListNode head) {

        return null;
    }
    public int climbStairs(int n) {
        if(n<=2){
            return n;
        }

        int pre = 1,last = 2,result = 0;
        for(int i = 3 ;i <= n ;i++){
            result = pre+last;
            pre = last;
            last = result;
        }
        return result;
    }
}
